<extend name="Public:base" />

<block name="content">
	<div class="row">
		<div class="col-lg-12">
			<h3 class="page-header"><em class="glyphicon glyphicon-cloud-upload"></em> 
			{$type}用户组(角色)
		    </h3>
		</div>
		
	</div>


	<div class="row">
		<div class="col-lg-12">

				<form method='post' class="form-horizontal" id="form_do" name="form_do" action="<if condition='$id'>{:U('editRole')}<else/>{:U('addRole')}</if>">	
					
					<div class="form-group">
						<label for="inputName" class="col-sm-2 control-label">用户组名</label>
						<div class="col-sm-9">
							<input type="text" name="name" id="inputName" value="{$role.name}" class="form-control" placeholder="用户组名" required="required" />		
						</div>
					</div>
					<div class="form-group">
						<label for="inputTitle" class="col-sm-2 control-label">描述</label>
						<div class="col-sm-9">
							<input type="text" name="remark" id="inputRemark" value="{$role.remark}" class="form-control" placeholder="描述" />		
						</div>
					</div>
					
					<div class="form-group">
						<label for="" class="col-sm-2 control-label">开启</label>
						<div class="col-sm-9">
							<label class="radio-inline">
							<input type="radio" name="status" value="1" <if condition="$id eq 0 OR $role['status'] eq 1">checked="checked"</if> />开启</label>
							<label class="radio-inline">
							<input type="radio" name="status" value="0" <if condition="$id eq 0 OR $role['status'] eq 0">checked="checked"</if> />关闭</label>
						</div>
					</div>

					<div class="row margin-botton-large">
						<div class="col-sm-offset-2 col-sm-9">
							<input type="hidden" name="pid" value="0" />
							<if condition="$id">
							<input type="hidden" name="id" value="{$id}" />
							</if>
							<div class="btn-group">							
								<button type="submit" class="btn btn-primary"> <i class="glyphicon glyphicon-saved"></i>
									保存
								</button>
								<button type="button" onclick="goUrl('{:U('role')}')" class="btn btn-default"> <i class="glyphicon glyphicon-chevron-left"></i>
									返回
								</button>
							</div>
						</div>
					</div>
				</form>
	
		</div>
	</div>

		


</block>